package com.cool.mapper.sysmanagemapper;

import com.cool.common.CommonResult;
import com.cool.po.sysmanagepo.MenuPo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 菜单
 *
 * @author Jiangmanman
 * @date 2020/07/28
 */
public interface MenuPoMapper {
    /**
     * delete by primary key
     *
     * @param menuId primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer menuId);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(MenuPo record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(MenuPo record);

    /**
     * select by primary key
     *
     * @param menuId primary key
     * @return object by primary key
     */
    MenuPo selectByPrimaryKey(Integer menuId);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(MenuPo record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(MenuPo record);

    List<MenuPo> selectTreeList();

    List<MenuPo> selectByMenuParentId(Integer menuParentId);

    Integer selectLevelByParentId(Integer menuParentId);

    Integer updateStateById(@Param("id") Integer id, @Param("state") Integer state);
}